//
// Created by buk on 8/29/24.
//

#ifndef AI_FACIAL_RECOGNITION_MESSAGES_H__
#define AI_FACIAL_RECOGNITION_MESSAGES_H__

#include <string>
#include <memory>
#include <boost/signals2.hpp>
#include <boost/property_tree/ptree.hpp>

namespace ai::facial_recognition {

  struct BaseMessage {
    boost::property_tree::ptree context;
  };
  typedef std::shared_ptr<BaseMessage> BaseMessagePtr;

  struct RequestMessage : public BaseMessage {
    std::string image_file_name;
    std::string web_root;

    std::string facial_regcognition_logs_path; //人脸识别日志文件路径或识别照片保存路径
    int member_id;
    std::string member_name;
    float confidence_level;
  };
  typedef std::shared_ptr<RequestMessage> RequestMessagePtr;
  typedef boost::signals2::signal<void (RequestMessagePtr)> RequestSignalType;

  struct FaceFeatureInfo
  {
    int member_id;
    std::string member_name;
    std::string face_feature;
    int face_feature_size;
    unsigned char * feature;
  };

  struct DeviceInfo
  {
    int device_id;
    std::string device_name;
    std::string rtsp_url;
    int device_type;
  };

}


#endif // AI_FACIAL_RECOGNITION_MESSAGES_H__
